<extend name="Public/frame" />
<block name="content-box">

    <form class="form-horizontal tpx-ajaxsubmit" role="form" action="{:U(CONTROLLER_NAME.'/'.ACTION_NAME)}" method="post">

        <div class="form-group">
            <label class="col-sm-2 control-label">{$f.title}</label>
            <div class="col-sm-9">
                <table border="0" style="table-layout:fixed">
                    <tr>
                        <td>
                            <span style="display:inline-block;padding:3px;border:1px solid #CCC;">
                                <img src="{$docmz_pdf_logo}" id="docmz_pdf_logo-preview" style="height:150px;min-width:50px;max-width:400px;" />
                            </span>
                        </td>
                        <td width="20">
                            <input type="hidden" name="docmz_pdf_logo" id="docmz_pdf_logo" value="docmz_pdf_logo" />
                        </td>
                        <td width="120">
                            <div id="imagefile_docmz_pdf_logo"></div>
                        </td>
                    </tr>
                </table>
                <script type="text/javascript">
                    require(["upload_button"],function(){
                        $("#imagefile_docmz_pdf_logo").UploadButton({
                            value_holder   : "#docmz_pdf_logo",
                            preview_holder : "#docmz_pdf_logo-preview",
                            width 	    : 24,
                            height 	    : 24,
                            postURL     : "{:U('System/uploadhandle?action=uploadbutton&type=image')}",
                            background  : "http://{$Think.server.HTTP_HOST}__ROOT__/asserts/upload_button/upload_24x24.png",
                            acceptExt   : ".png",
                            showLoading : true,
                            showAlert   : false
                        });
                    });
                </script>
                <div class="help-block">生成pdf时自动添加到文件头的logo</div>
            </div>
        </div>

        <div class="form-group">
            <div class="col-sm-offset-2 col-sm-10">
                <button type="submit" class="btn btn-primary">{$Think.lang.submit}</button>
            </div>
        </div>

    </form>

</block>